import { obj2Str } from './share'

/**
 * 页面跳转
 * @param {String} url  跳转页面 必选
 * @param {Object} queryObj 携带的参数 可选
 * @example navigateToPage('/pages/detail/detail',{id:1})
 */
export const navigateToPage = (url, queryObj = {}) => {
  const queryStr = Object.keys(queryObj).length ? obj2Str(queryObj) : ''
  uni.navigateTo({ url: url + queryStr })
}

export const makePhoneCall = phoneNumber => {
  return uni.makePhoneCall({
    phoneNumber //仅为示例
  });
}

